using System;

namespace AlternativePorts.Threading
{
    public delegate void ExecuteHandler();

    public class DelegateTask : Task
    {
        private ExecuteHandler _action;

        public DelegateTask(ExecuteHandler action)
        {
            _action = action;
        }

        public override void Execute()
        {
            _action.Invoke();
        }
    }
}
